negotiator.qualitymeasures
Class CSVlogger

java.lang.Object
  extended by negotiator.qualitymeasures.CSVlogger

public class CSVlogger
extends java.lang.Object

Class used to write the results of quality measures to a csv- formatted file.

Author:
Mark Hendrikx

Constructor Summary
CSVlogger(java.lang.String path, java.lang.String agentA, java.lang.String spaceA, java.lang.String agentB, java.lang.String spaceB, java.lang.String domain)
          Creates a CSV logger
CSVlogger(java.lang.String path, Trace trace)
           
 
Method Summary
 void addMeasure(java.lang.String name, java.util.ArrayList<java.lang.Double> results)
          Add an array with the results of a particular quality measures to the set of arrays which should be printed
 void writeToFileCompact(double timeOfAgreement, boolean agreement, int runNr)
          Writes the quality measures to a compact log.
 void writeToFilePivotCompatible(int runNr, double sampleSpeed, boolean firstEntry)
          Writes the quality measures to a pivot-table compatible log.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSVlogger

public CSVlogger(java.lang.String path,
                 java.lang.String agentA,
                 java.lang.String spaceA,
                 java.lang.String agentB,
                 java.lang.String spaceB,
                 java.lang.String domain)
Creates a CSV logger

Parameters:
path - where the file should be stored (included extension)
agentA - name of agent A
spaceA - utility space of agent A
agentB - name of agent B
spaceB - utility space of agent B

CSVlogger

public CSVlogger(java.lang.String path,
                 Trace trace)
Method Detail

addMeasure

public void addMeasure(java.lang.String name,
                       java.util.ArrayList<java.lang.Double> results)
Add an array with the results of a particular quality measures to the set of arrays which should be printed

Parameters:
name - of the quality measure
results - of the quality measure

writeToFileCompact

public void writeToFileCompact(double timeOfAgreement,
                               boolean agreement,
                               int runNr)
Writes the quality measures to a compact log.


writeToFilePivotCompatible

public void writeToFilePivotCompatible(int runNr,
                                       double sampleSpeed,
                                       boolean firstEntry)
Writes the quality measures to a pivot-table compatible log. Information is duplicated many times, and therefore this format should only be used as final output.

Parameters:
firstEntry -